<template>
  <div>
    <!-- 头部 -->
    <!-- 通过添加的路由元信息show 判断是否显示或隐藏 -->
    <Head v-show="$route.meta.show"/>

    <!-- 路由的出口 判断是否需要缓存-->
    <keep-alive>
        <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
    
    <!-- 底部tabBar -->
    <!-- 通过添加的路由元信息show 判断是否显示或隐藏 -->
    <tabBarView v-show="$route.meta.show"/>
  </div>
</template>
<script>
import Head from '@/components/Head'
import tabBarView from '@/components/tabBar/tabBarView.vue'
export default {
  name: "App",
  components: { tabBarView,Head },
};
</script>

<style lang="less">
body {
  max-width: 970px;
  // min-width: 320px;
  margin: 0 auto !important;
}

* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
}
</style>
